<?php
/**
 * Created by PhpStorm.
 * User: xiao
 * Date: 2018/4/12
 * Time: 18:50
 */

namespace App\Http\Utils;


class PageUtil
{

    const PAGE = 1;
    const SIZE = 10;

    const KEY_PAGE = 'page';
    const KEY_SIZE = 'pageSize';


    /**
     * 获取页码
     * @return string @页码
     */
    public static function P()
    {
        return intval(request(self::KEY_PAGE, self::PAGE));
    }


    /**
     * 获取页大小
     * @return string @页大小
     */
    public static function PS()
    {
        return intval(request(self::KEY_SIZE, self::SIZE));
    }

}